package com.exam.exception;

import com.exam.enums.ResultEnum;
import lombok.Getter;

/**
 * Created by v
 * Date:2019/1/6
 * Time:20:47
 */
@Getter
public class ExaminationException extends RuntimeException{

    private Integer code;

    public ExaminationException(ResultEnum resultEnum) {
        super(resultEnum.getMessage());
        this.code = resultEnum.getCode();
    }

    public ExaminationException(Integer code, String message) {
        super(message);
        this.code = code;
    }
}
